package com.shenhua.kunpeng.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
@Data
public class BaseEntity implements Serializable {
    private Long id;
    /**
     * 逻辑删除  0：已删除 1：未删除
     */
    @TableLogic(delval = "0",value = "1")
    private Integer mark;

    /**
     * 创建人ID
     */
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建人名称
     */
    @TableField(fill = FieldFill.INSERT)
    private String createName;

    /**
     * 记录插入时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改人ID
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String modifiedBy;

    /**
     * 修改人名称
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String modifiedName;

    /**
     * 记录最后更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastModifiedTime;

    /**
     * 删除人ID
     */
    private String deleteBy;

    /**
     * 删除人名称
     */
    private String deleteName;

    /**
     * 逻辑删除时间
     */
    private LocalDateTime deleteTime;

    /**
     * 版本号
     */
    @Version
    private Integer versionnub;


    public static final String ID = "id";
    public static final String MARK = "mark";

    public static final String CREATE_BY = "create_by";

    public static final String CREATE_NAME = "create_name";

    public static final String CREATE_TIME = "create_time";

    public static final String MODIFIED_BY = "modified_by";

    public static final String MODIFIED_NAME = "modified_name";

    public static final String LAST_MODIFIED_TIME = "last_modified_time";

    public static final String DELETE_BY = "delete_by";

    public static final String DELETE_NAME = "delete_name";

    public static final String DELETE_TIME = "delete_time";

    public static final String VERSIONNUB = "versionnub";



}
